package homework4

import akka.actor.{ActorSystem, Props}

object Main {
  def main(args: Array[String]): Unit = {
    val myFactory = ActorSystem("myFactory")
    val aActorRef = myFactory.actorOf(Props[AActor], "aActor")
    val bActorRef = myFactory.actorOf(Props[BActor], "bActor")

    aActorRef
    val flag = true
    println("AActor 出招了...")
    println("start, ok!")
    println("我打")
    bActorRef ! ("我打", aActorRef)
    /*while (flag) {
      println("AActor 出招了...")
      println("start, ok!")


    }*/
  }

}
